
import 'package:flustars_flutter3/flustars_flutter3.dart';

/**
 * 时间转换
 */
class TimeUtils{
  static String forMatTime(String dateTime,{String format}){
    return DateUtil.formatDateStr('$dateTime',format: format??'yyyy-MM-dd');
  }
static DateTime getTimeDate(String dateTime,{String format}){
    return DateUtil.getDateTime('$dateTime');
  }

  static String forMatTimeByMs(int dateTime,{String format}){
    return DateUtil.formatDateMs(dateTime,format: format??'yyyy-MM-dd');
  }
  static String forMatTimeByDateTime(DateTime dateTime,{String format}){
    return DateUtil.formatDate(dateTime,
        format: format??'yyyy-MM-dd HH:mm:ss');
  }
  static int getMillisecondsSinceEpochTime({int  day:0,int  hours:0,int  minutes:0,}){
    int millisecondsSinceEpochTime=day*24*60*60*1000+hours*60*60*1000+minutes*60*1000;
    return millisecondsSinceEpochTime;
  }
}